package com.vichat.business.entity;


import javax.persistence.*;

/***************
 *author: autogen
 *version: 2019-01-04 16:28:00.829
 */
@Entity
@Table(name = "district_fence_rule",catalog = "businessdb")
public class DistrictFenceRule implements java.io.Serializable{

	private static final long serialVersionUID = 1L;
	


    public static final String TABLE = "district_fence_rule";

    /**规则ID */
	public static final String ALIAS_RULE_ID = "rule_id";
    /**规则枚举类型 1 时间按天 2 时间按周 */
	public static final String ALIAS_RULE_TYPE = "rule_type";
    /**围栏ID */
	public static final String ALIAS_FENCE_ID = "fence_id";
    /**规则JSON */
	public static final String ALIAS_RULE_JSON = "rule_json";
    /**告警条件 1 首次告警 2 连续告警 */
	public static final String ALIAS_RULE_CONDITION = "rule_condition";
    /**数据 0 无效 1 有效 */
	public static final String ALIAS_STATE = "state";
    /**告警等级 */
	public static final String ALIAS_ALARM_LEVEL = "alarm_level";
	
	

 	@Id
@   GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "rule_id", unique = true, nullable = false)
    public java.lang.Long ruleId;
  
 	@Column(name = "rule_type")
    public java.lang.Long ruleType;
  
 	@Column(name = "fence_id")
    public java.lang.Long fenceId;
  
 	@Column(name = "rule_json")
    public java.lang.String ruleJson;
  
 	@Column(name = "rule_condition")
    public java.lang.Long ruleCondition;
  
 	@Column(name = "state")
    public java.lang.Long state = 1l;
  
 	@Column(name = "alarm_level")
    public java.lang.Long alarmLevel;
  





	public java.lang.Long getRuleId() {
		return this.ruleId;
	}
	
	public void setRuleId(java.lang.Long value) {
		this.ruleId = value;
	}

	public java.lang.Long getRuleType() {
		return this.ruleType;
	}
	
	public void setRuleType(java.lang.Long value) {
		this.ruleType = value;
	}

	public java.lang.Long getFenceId() {
		return this.fenceId;
	}
	
	public void setFenceId(java.lang.Long value) {
		this.fenceId = value;
	}

	public java.lang.String getRuleJson() {
		return this.ruleJson;
	}
	
	public void setRuleJson(java.lang.String value) {
		this.ruleJson = value;
	}

	public java.lang.Long getRuleCondition() {
		return this.ruleCondition;
	}
	
	public void setRuleCondition(java.lang.Long value) {
		this.ruleCondition = value;
	}

	public java.lang.Long getState() {
		return this.state;
	}
	
	public void setState(java.lang.Long value) {
		this.state = value;
	}

	public java.lang.Long getAlarmLevel() {
		return this.alarmLevel;
	}
	
	public void setAlarmLevel(java.lang.Long value) {
		this.alarmLevel = value;
	}


	
	public DistrictFenceRule() {
	}
	
	public DistrictFenceRule(boolean qryflag) {
	    if(qryflag){
	    		this.ruleId = null;
				this.ruleType = null;
				this.fenceId = null;
				this.ruleJson = null;
				this.ruleCondition = null;
				this.state = null;
				this.alarmLevel = null;
			    }
	}


	public DistrictFenceRule(
	    java.lang.Long inRuleId,
	    java.lang.Long inRuleType,
	    java.lang.Long inFenceId,
	    java.lang.String inRuleJson,
	    java.lang.Long inRuleCondition,
	    java.lang.Long inState,
		java.lang.Long inAlarmLevel
	 ) {
		super();
				this.ruleId = inRuleId;
				this.ruleType = inRuleType;
				this.fenceId = inFenceId;
				this.ruleJson = inRuleJson;
				this.ruleCondition = inRuleCondition;
				this.state = inState;
				this.alarmLevel = inAlarmLevel;
			}





}

